package com.lhkj.ct.meta.modules.gauge.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.lhkj.ct.base.enums.GlobalStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 测验组套
 * </p>
 *
 * @author jobob
 * @since 2023-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblScaleSet对象", description="测验组套")
public class TblScaleSet implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "组合id")
    private String id;

    @NotBlank(message = "组套名称不能为空")
    @ApiModelProperty(value = "组套名称")
    private String combName;

    @NotNull(message = "请设置启用状态")
    @ApiModelProperty(value = "状态 0.正常 1.禁用")
    private GlobalStatus status;

    @Length(max = 500, message = "备注不能超过{max}字符")
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "组合所包含量表名称")
    private String scaleNames;

    @TableField(exist = false)
    @NotEmpty(message = "请至少选择一个量表")
    @ApiModelProperty(value = "组合所包含量表")
    private List<String> scaleIds;

}
